home *** CD-ROM | disk | FTP | other *** search
-
- /* random atari funs */
-
- #include <stdio.h>
- #include <file.h>
- #include <osbind.h>
-
- long _stksize = 32768;
-
- int creat(name, crapola)
- char * name;
- int crapola;
- {
- return(open(name, O_WRONLY | O_CREAT | O_TRUNC, 0));
- }
-
- int system(str)
- char * str;
- {
- fprintf (stderr, " system('%s')\n", str);
- return (-1);
- }
-
- setbuf(f, b)
- FILE * f;
- char * b;
- {
- /* more stupidity */
- }
-
- int chdir(dir)
- char * dir;
- {
- return(Dsetpath(dir));
- }
-
- _eprintf(str, a1, a2, a3, a4, a5, a6)
- char * str;
- int a1, a2, a3, a4, a5, a6;
- {
- fprintf(stderr, str, a1, a2, a3, a4, a5, a6);
- }
-
- int link(foo, bar)
- char * foo, * bar;
- {
- /* I think the best we can do here is rename... */
- return(Frename(0, foo, bar));
- }
-
- int chmod(name, stupidity)
- char * name;
- int stupidity;
- {
- return (0);
- }
-
- int popen(barfage)
- char * barfage;
- {
- fprintf(stderr, "popen('%s')\n", barfage);
- return (-1);
- }
-
- int pclose()
- {
- return(0);
- }
-
- /* debug rtn */
- int xxxopen(foo, bar)
- char * foo;
- int bar;
- {
- int result;
-
- fprintf(stderr, "open('%s', %d)->", foo, bar);
- result = open(foo, bar);
- fprintf(stderr, "%d\n", result);
- return(result);
- }
-
- char * xxxmalloc(nbytes)
- int nbytes;
- {
- char * result;
-
- fprintf(stderr, "malloc(%d)", nbytes);
- result = (char * )malloc(nbytes + 64);
- fprintf(stderr, "->%X\n", result);
- return(result);
- }
-
- char * xxxrealloc(p, nbytes)
- char * p;
- int nbytes;
- {
- char * result;
-
- fprintf(stderr, "realloc(%X, %d)", p, nbytes);
- result = (char * )realloc(nbytes + 64);
- fprintf(stderr, "->%X\n", result);
- return(result);
- }
-
- xxxfree(p)
- char * p;
- {
- fprintf(stderr, "free(%X)\n", p);
- free(p);
- }
-
-